{php include wl_template('common/header');}
<ul class="nav nav-tabs">
	<li class="active"><a href="#">排行榜列表</a></li>
</ul>
<div class="app-content">
	<div class="app-filter">
		<div class="filter-action">
			<a href="{php echo web_url('ranklist/rank/rank_edit')}" class="btn btn-primary">添加排行榜</a>
		</div>
	</div>
	<div class="app-table-list">
		<div class="table-responsive">
			<table class="table table-hover">
				<thead>
					<tr>
						<th style="width:100px;text-align:center;">ID</th>
						<th style="width:100px;text-align:center;">名称</th>
						<th style="width:100px;text-align:center;">类型</th>
						<th style="width:100px; text-align:center;">排序</th>
						<th style="width:200px; text-align:center">操作</th>
					</tr>
				</thead>
				<tbody>
					{loop $lists $list}
                        <tr>
                            <td class="text-center">{$list['id']}</td>
                            <td class="text-center">{$list['name']}</td>
                            <td class="text-center">
                                {if $list['type'] == 1}
                                    <label class='label label-success'>商户</label>
                                {else}
                                    <label class='label label-primary'>用户</label>
                                {/if}
                            </td>
                            <td class="text-center">
                                {if $list['orderby'] == 0}
                                用户积分
                                {elseif $list['orderby'] == 1}
                                用户余额
                                {elseif $list['orderby'] == 2}
                                用户消费金额
                                {elseif $list['orderby'] == 11}
                                商户人气
                                {elseif $list['orderby'] == 12}
                                商户订单数
                                {elseif $list['orderby'] == 13}
                                商户营业额
                                {/if}
                            </td>
                            <td class="text-center" style="text-align: center;position: relative;">
                                <a class="btn btn-info btn-sm js-clip" data-url="{$_W['siteroot']}addons/{MODULE_NAME}/v3/index.html?i={$_W['uniacid']}&do=getorder&p=ranklist&id={$list['id']}" href="javascript:;">复制链接</a>
                                <a class="btn btn-primary btn-sm" href="{php echo web_url('ranklist/rank/rank_edit', array('id' => $list['id']));}">编辑</a>
                                <a class="btn btn-sm btn-danger"  data-toggle="ajaxRemove" href="{php echo web_url('ranklist/rank/rank_del', array('id' => $list['id']));}" data-confirm="确定删除当前排行榜">删除</a>
                            </td>
                        </tr>
					{/loop}
				</tbody>
			</table>
		</div>
		<div class="app-table-foot clearfix">
			<div class="pull-left">
				
			</div>
			<div class="pull-right">
				{$pager}
			</div>
		</div>
	</div>
</div>
{php include wl_template('common/footer');}